package net.easyjava.third.juhe.bean;

import com.alibaba.fastjson.annotation.JSONField;
import net.easyjava.tools.BaseBean;

/**
 * juhe接口返回统一结果集
 * Created by wxnacy on 16/7/17.
 */
public class ResultBean extends BaseBean {

    private static final long serialVersionUID = 2276275814375264280L;
    private String reason;//返回说明
    private String result;//	返回结果集
    @JSONField(name = "error_code")
    private int errorCode;//	返回码

    public ResultBean() {
    }

    public boolean isSuccess(){
        return errorCode == 0;
    }

    public boolean isError(){
        return errorCode != 0;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public int getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(int errorCode) {
        this.errorCode = errorCode;
    }
}
